//静态内部类(内部类前面添加了static的关键字),基本上不用
package object4.package8;

public class Test2 {
    private int n = 20;

    private static int N = 10;

    //静态内部类
    static class Inner{
        private int m = 10;

        public void printM(){
            System.out.println("m = " + m);
//            System.out.println("n = " + n);
            //静态内部类,无法访问到外部类的实例属性
            //但可以访问到外部静态类的实例属性
            System.out.println("N = " + N);
        }
    }

    public static void main(String[] args) {
        Inner inner = new Inner();
        inner.printM();
    }
}
